﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.DBUtility;
public partial class Manage_GoodsOperatorLog : System.Web.UI.Page {
    
    protected void Page_Load(object sender, EventArgs e) {

        if (HZ.MBSM.BLL.Login.CheckAssert(this.UseAccountType)) {
            HZ.MBSM.Model.Account _Account = (HZ.MBSM.Model.Account)System.Web.HttpContext.Current.Session["Account"];    
            string goodsid = MsgBox.JieMi_Decrypt(Request.QueryString["GoodsId"].ToString());
            string strsql = " username as 操作人,OperatedType as 操作类型,NoPass as 操作结果, OperatedTime as 操作时间";
            Db db = new Db();
            DbPage dbPage = new DbPage(db);
            dbPage.Table = "OperatedLogs";                                               //要查询的表明
            dbPage.Key = "Logid";                                               //表的主键    
            dbPage.Where = "fieldid='" + goodsid + "'";                                           //查询条件    
            dbPage.SelectField = strsql;//要显示的字段
            dbPage.PageIndex = SysFun.ToInt(Request["CurrentlyPageIndex"]);          //要显示第几页   
            dbPage.PageSize = 15;                                                    //没有显示记录条数   
            dbPage.OrderBy = "OperatedTime,username";                  //排序字段
            dbPage.OrderByIsDesc = true;
            System.Data.IDataReader dr = dbPage.ExecuteReader();
            GridView1.DataSource = dr;
            GridView1.DataBind();
            dr.Close();
            dr.Dispose();
            dbPage.Db.Close();
            db.Close();
            dr = null;
            db = null;
            this.DbPageFlip1.DbPage = dbPage;//将数据传给控键

        }
    }

    #region IPageDescribe 成员

    public string Name {
        get { return "审核商品信息"; }
    }

    public string Describe {
        get { return "审核商品信息"; }
    }

    public string ParentName {
        get { return "商品维护"; }
    }

    public System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> UseAccountType {
        get {
            System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> _AccountType = new System.Collections.Generic.List<HZ.MBSM.DAL.AccountType>();
            _AccountType.Add(HZ.MBSM.DAL.AccountType.enumAdmin);
            _AccountType.Add(HZ.MBSM.DAL.AccountType.enumAttorney);
            _AccountType.Add(HZ.MBSM.DAL.AccountType.enumComapanyRG); 

            return _AccountType;
        }
    }
    #endregion
}
